require('./PageCertificateView.less');
import { Control, Route } from 'react-keeper';
import React,{Component} from 'react';
import Reflux from 'reflux';
import ReactMixin from 'react-mixin';
import UserCertificateView from '../../../components/user/UserCertificateView';

import Actions from './Actions'
import Store from './Store';
import 'weui';
import { Tab,TabBarItem,TabBar,Page,Article,
  Panel,
  PanelHeader,
  PanelBody,
  PanelFooter,
  MediaBox,
  MediaBoxHeader,
  MediaBoxBody,
  MediaBoxTitle,
  MediaBoxDescription,
  MediaBoxInfo,
  MediaBoxInfoMeta,
  Cells,
  Cell,
  CellHeader,
  CellBody,
  CellFooter,
  Flex,
  FlexItem,Gallery, GalleryDelete,
  Grids
} from  'react-weui/build/packages'
import thumbSrc from './../../../assets/icon/人员新增.png';
import photoSrc from './../../../assets/icon/人员新增.png';



class CertificateView extends Component {
    constructor(props) {
      super(props);
      this.state = {
        gallery: false,
        demoFiles : [
          {
            url: thumbSrc,
          },
          {
            url: photoSrc
          },
        ]
      };
      this.handleChange = this.handleChange.bind(this);
      this.myHome = this.myHome.bind(this);
    }

    handleChange(key){
        //this.dispatch('setTabbarIndex',key);
    }

  myHome() {
    Control.go('/home');
  }

  componentWillMount() {
    if(Control.state){
      Actions.loadMode(Control.state);
    }
  }




    render() {
        return (

          <div className="page certificateview">
            <UserCertificateView cert={this.state.certificateview.cert} imgls={this.state.certificateview.imgls} />
          </div>

        );
    }

    componentDidMount() {
    }

}

ReactMixin.onClass(CertificateView, Reflux.connect(Store, 'certificateview'));

export default CertificateView ;
